package com.hama.iotrust.ws.ext;

import org.codehaus.jackson.map.DeserializationConfig;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.SerializationConfig;
import org.codehaus.jackson.map.annotate.JsonSerialize;

public class CustomObjectMapper extends ObjectMapper {

    public CustomObjectMapper(){
        super();
        super.configure(SerializationConfig.Feature.WRAP_ROOT_VALUE, true);
        super.configure(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE, true);
        super.setSerializationInclusion(JsonSerialize.Inclusion.NON_NULL);
    }
}
